package test.administrator.example.com.mvptest1.framework.support.viewstate;

import android.support.annotation.NonNull;

import test.administrator.example.com.mvptest1.framework.MvpPresenter;
import test.administrator.example.com.mvptest1.framework.MvpView;
import test.administrator.example.com.mvptest1.framework.support.MvpDelegateCallback;
import test.administrator.example.com.mvptest1.framework.support.viewstate.ViewState;

/**
 * 第二重代理->针对ViewState缓存(适用于activity和fragment)->目标接口
 * Created by thinkpad on 2018/8/6.
 */
public interface MvpViewStateDelegateCallback<V extends MvpView, P extends MvpPresenter<V>, VS extends ViewState<V>> extends MvpDelegateCallback<V, P> {

	VS getViewState();

	void setViewState(VS viewState);

	@NonNull
	VS createViewState();

	void setRestoringViewState(boolean restoringViewState);

	boolean isRestoringViewState();

	void onViewStateInstanceRestored(boolean instanceStateRetained);

	void onNewViewStateInstance();

}



























































































